<style type="text/css">
    ul.modules { padding: 3px; }
    ul.modules li { width: 25%; line-height: 30px; float: left; }
    ul.modules li label { padding: 0 0 0 4px; }
    ul.modules li input.checkbox { vertical-align: middle; }
</style>
<?php
$config = Yii::app()->params['nodeModule'];
$yes_or_no = array(
    0 => Yii::t('common', 'no'),
    1 => Yii::t('common', 'yes'),
);
?>

<div>
    <?php echo CHtml::beginForm(array('nodeModule'), 'post', array('class' => 'dot_form')); ?>
    <fieldset>
        <legend><?php echo Yii::t('common', 'please_fill_table_contents'); ?></legend>
        <div class="box_container">
            <div class="clearfix">
                <ul class="modules">
                    <?php foreach (Node::model()->typeOptions as $node => $caption): ?>

                        <?php
                        if (isset($config[$node])) {
                            $checked = (intval($config[$node])) ? 1 : 0;
                        } else {
                            $checked = 0;
                        }
                        //echo CHtml::dropDownList($node, $selected, $yes_or_no);
                        echo "<li>";
                        echo CHtml::checkBox($node, $checked, array('class' => 'checkbox'));
                        echo CHtml::label($caption, $node);
                        echo "</li>";
                        ?>
                    <?php endforeach; ?>
                </ul>
            </div>
            <div class="row_btns">
                <?php echo CHtml::submitButton(Yii::t('common', 'update'), array('name' => 'submit_setting', 'class' => 'btn')); ?>
            </div>
        </div>
    </fieldset>
    <?php echo CHtml::endForm(); ?>
</div>